<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head th:replace="header :: common_header(~{::title},~{::link})">
    <title>秒到2.0商户管理后台</title>
</head>

<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
    <div class="page-wrapper">
        <div class="page-header navbar navbar-fixed-top" th:insert="~{index :: navbar-top}">
        </div>
        <div class="clearfix"> </div>
        <div class="page-container">
            <div class="page-sidebar-wrapper" th:insert="~{index :: sidebar}">
            </div>
            <div class="page-content-wrapper">
                <div class="page-content">
                    <!--<div class="page-bar">
                        <ul class="page-breadcrumb">
                            <li>
                                <a href="#">首页</a>
                                <i class="fa fa-circle"></i>
                            </li>
                            <li>
                                <a href="#">系统管理</a>
                                <i class="fa fa-circle"></i>
                            </li>
                            <li>
                                <span>代理商充值</span>
                            </li>
                        </ul>
                    </div>-->
                    <!-- <h1 class="page-title"> 角色管理</h1> -->
                    <div class="row">
                        <div class="col-md-12">
                            <div class="portlet light bordered">
                                <div class="portlet-title">
                                    <div class="caption font-dark">
                                        <i class="icon-settings font-dark"></i>
                                        <span class="caption-subject bold uppercase"> 账号充值</span>
                                    </div>
                                </div>
                                <div class="portlet-body">
                                    <!-- <div class="table-toolbar">
                                        <div class="row">
                                            <div class="col-md-6"></div>
                                            <div class="col-md-6">
                                                <div class="btn-group pull-right">
                                                    <button id="btn_new_role" class="btn sbold green"> 添加角色
                                                        <i class="fa fa-plus"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                    </div> -->
                                    <div class="col-sm-2"></div>
									<div class="input-group col-sm-7">
									     <input id="agentinfo"  type="number" th:value="${searchAgent}" class="form-control input-lg  glyphicon" placeholder="搜索(输入手机号)">
									      <span id="searchAgent" class="input-group-addon  btn btn-primary">查询</span>
									      <span id="rechargeAgent" class="input-group-addon  btn btn-primary ">充值</span>
									</div>
									  <div class="col-sm-3"></div>
									<div id="agent_content" class=""><!-- class="hidden" -->
										<!-- 表单提交-->
										<form action="" method="PUT" id="form_recharge_new"
											class="form-horizontal">
											<div class="form-body">
												<div class="alert alert-danger display-hide">
													您填写的信息有错误，无法提交，请检查。</div>
												<div class="alert alert-success display-hide">
													表单填写完毕，正在提交...</div>
												<div class="alert alert-warning display-hide">
													提交失败，请联系客服！</div>
													
												<div class="form-group"  >
													<div class="col-md-5" >
														<span class="help-block text-center" ></span> 
														<input type="hidden" name="id" th:value="${agent?.id}">
															<input type="hidden" name="upid" >
																<input type="hidden" class="form-control leftCount" th:value="${agent?.leftCount}" 
															  >
													</div>
												</div>
													<div  >
												<div class="form-group">
													<lable class="col-md-3 control-label"> <span
														class="required"> * </span>手机号：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${agent?.phone}"
															name="phone"  onchange="getPwdandAd()"
															placeholder="手机号" readonly >
													</div>
												</div>
												</div>
												<div class="form-group">
													<lable class="col-md-3 control-label"> <span
														class="required"> * </span>账号：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${operator?.loginName}"
															name="loginName" 
															placeholder="自动生成" readonly  >
													</div>
												</div>
											<!-- 	<div class="form-group">
													<lable class="col-md-3 control-label"> <span
														class="required"> * </span>密码：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control "
															name="loginName" 
															placeholder="自动生成" readonly th:value="${operator?.loginName}" >
													</div>
												</div> -->
												<div class="form-group">
													<lable class="col-md-3 control-label">
													<span class="required"> * </span>代理商联系人：</lable>
													<div class="col-md-5">
													 <input type="text" class="form-control " th:value="${agent?.contractName}" 
															name="contractName" placeholder="代理商联系人" readonly>
													</div>
												</div>
												<div class="form-group">
													<lable class="col-md-3 control-label">
													<span class="required"> * </span>代理商级别：</lable>
													<div class="col-md-5">
		                                            <input type="text" class="form-control " th:value="${agentLevel?.name}" 
															name="contractName" placeholder="代理商级别" readonly>                                         
										</div>
									</div>
											<div class="form-group">	
													<lable class="col-md-3 control-label">代理套数：</lable>
													<div class="col-md-5">
											<input type="text" class="form-control " th:value="${agent?.totalCount}" 
															name="contractName" placeholder="代理套数" readonly>
															
                                    </div>
											</div>	
												<!-- <div class="form-group">
												<lable class="col-md-3 control-label">
													<span class="required"> * </span>模板：</lable>
													<div class="col-md-5">
														<input type="checkbox" name="templateId"   th:checked="${templateId1}" value="电商"> 电商 
														<input type="checkbox" name="templateId"  th:checked="${templateId2}" value="餐饮"> 餐饮 
														<input type="checkbox" name="templateId"  th:checked="${templateId3}" value="旅游"> 旅游 
													</div>
												</div> -->
												<div class="form-group">	
													<lable class="col-md-3 control-label">
													<span class="required"> * </span>类型：</lable>
													<div class="col-md-5">
												<input type="text" class="form-control " th:value="${agent?.type}"
															name="name"  placeholder="类型" readonly>
                                                  </div>
											</div>	
													<div class="form-group">
													<lable class="col-md-3 control-label"><span class="required"> * </span>代理商名称：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${agent?.name}"
															name="name"  placeholder="代理商名称" readonly>
													</div>
												</div>
												<div id="distpicker" data-toggle="distpicker">
													<div class="form-group">
													<lable class="col-md-3 control-label"><span class="required"> * </span>省份：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${agent?.province}" 
															name="province"  placeholder="省份" readonly>
														</div>
													</div>
							                      	<div class="form-group">
							                      	<lable class="col-md-3 control-label"><span class="required"> * </span>城市：</lable>
							                      	<div class="col-md-5">
														<input type="text" class="form-control " th:value="${agent?.city}" 
															name="city"  placeholder="城市" readonly>
													</div>
														</div>
							                    </div>
													<div class="form-group">
													<lable class="col-md-3 control-label">地址：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${agent?.address}" 
															name="address"   placeholder="商户地址" readonly>
													</div>
												</div>
												<div class="form-group">
													<lable class="col-md-3 control-label">代理时间：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${#calendars.format(agent?.createDate,'yyyy-MM-dd HH:mm')}"  
															name="address"   placeholder="代理时间" readonly>
													</div>
												</div>
												<div class="form-group">
													<lable class="col-md-3 control-label">充值时间：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${#calendars.format(recharge?.createDate,'yyyy-MM-dd HH:mm')}" 
															name="address"   placeholder="充值时间" readonly>
													</div>
												</div>
												<!-- <div class="form-group">
													<lable class="col-md-3 control-label">代理账户：</lable>
													<div class="col-md-5">
														<input type="text" class="form-control " th:value="${agent?.name}"
															name="address"   placeholder="代理账户"  readonly>
													</div>
												</div> -->
											</div>
										</form>
										<!-- 表单提交-->
									</div>
			<!-- 新增 -->
            <div class="modal fade" id="modal_new_role" data-backdrop="static" data-keyboard="false">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">
                            </button>
                            <h4 class="modal-title">充值</h4>
                        </div>
                        <div class="modal-body">
                            <!-- 表单提交-->
                            <form action=""  id="form_recharge_new" class="form-horizontal">
                            <input type="hidden" name="upAgentId" >
                              <input type="hidden" id="minCount" >
                                <input type="hidden" id="maxCount" >
                                <div class="form-body">
                                    <div class="alert alert-danger display-hide">
                                        您填写的信息有错误，无法提交，请检查。
                                    </div>
                                    <div class="alert alert-success display-hide">
                                        表单填写完毕，正在提交...
                                    </div>
                                    <div class="alert alert-warning display-hide">
                                        提交失败，请联系客服！
                                    </div>
                                    <div class="form-group">
                                    <span class="help-block1 text-center" ></span> 
                                        <lable class="col-md-3 control-label">充值套数：
                                            <span class="required"> * </span>
                                        </lable>
                                        <div class="col-md-9">
                                            <input type="number" id="inputCount"  class="form-control input-medium" name="name" placeholder="请填写充值金额">
                                        </div>
                                    </div>
                                    <div id="checkbox_new" th:if="${not #lists.isEmpty(mList)}" style="width: 100%;height: auto;overflow: hidden;">
                                        <div class="checkbox-inline" th:each="m:${mList}" style="margin:0 10px;padding:0;overflow: hidden;width: 120px;">
                                            <label>
                                                <input type="checkbox" name="relaIds" th:value="${m.id}" style='position: relative !important; padding: 0;margin: 0;'>
                                            <span>[[${m.name}]]</span>
                                            </label>                                            
                                        </div>
                                    </div>
                                </div>
                                <div class="modal-footer">
                                    <button type="button" id="sub" class="btn green">提交</button>
                                    <button type="button" class="btn default" data-dismiss="modal">取消</button>
                                </div>
                            </form>
                            <!-- 表单提交-->
                        </div>
                    </div>
                </div>
            </div>
								</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 弹框 -->
            <!-- 新增 -->
            <!-- 修改 -->
        </div>
        <div class="page-footer">
            <div class="page-footer-inner"> 2017 &copy; 秒迅科技</a>
            </div>
            <div class="scroll-to-top">
                <i class="icon-arrow-up"></i>
            </div>
        </div>
    </div>
    <!-- 业务js -->
    <script th:src="@{/assets/pages/scripts/recharge.js}" type="text/javascript"></script>
</body>
</html>